home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Information / WebSites / Wirenet / files / Dashboard2.lha / Dashboard2 / AmiTCP / bin / ParseThor < prev    next >
Text File  |  1998-03-27  |  1KB  |  57 lines

  1. /*
  2. $VER: ParseThor 2.0 (26.3.98)
  3. (c) Neil Bothwick
  4.  
  5. Imports downloaded news and mail into Thor
  6. */
  7.  
  8. /* ;;;Change these to suit your setup */
  9. System  = 'Wirenet'                 /* The name of your Internet system in Thor */
  10. LogFile = 'UUSpool:Info.log'
  11. ;;;
  12. /* ;;;Don't change anything below here */
  13. options results
  14. address command
  15.  
  16. 'Wirenet:bin/AddLibs'
  17. if ~show('p', 'BBSREAD') then do
  18.     'run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead'
  19.     'WaitForPort BBSREAD'
  20.     end
  21. ;;;
  22. /* ;;;Get the path to System data */
  23. drop BBS.
  24. address BBSREAD
  25. GETBBSDATA '"'System'"' stem BBS
  26. SystemDir = BBS.BBSPATH
  27. TempDir   = SystemDir'tcp_tmp'
  28. TempBak   = SystemDir'tcp_tmp.bak'
  29. address command
  30. ;;;
  31. /* ;;;Make backup copy of batch and progress files */
  32. if exists(TempDir) then do
  33.     if ~exists(TempBak) then 'makedir' TempBak
  34.     'copy' TempDir TempBak 'all clone quiet'
  35.     end
  36. ;;;
  37. /* ;;;Unbatch mail/news */
  38. unbatch = 0
  39. if exists(TempDir'/m.0') then do
  40.     if word(statef(TempDir'/m.0'),2) >0 then unbatch = 1
  41.     end
  42. else do i=0 to 9
  43.     if exists(TempDir'/n.'i) then do
  44.         unbatch = 1
  45.         leave
  46.         end
  47.     end
  48.  
  49. if unbatch = 1 then do
  50.     TempLog = 'T:Parse.'||time(s)
  51.     GetVar('Thor/ThorPath')||'bin/GetTCP BBSNAME' System 'SOCKETS 10 PUBSCREEN "" PARSEONLY LOGFILE' TempLog
  52.     'run >NIL: ShowLog' TempLog req log info
  53.     end
  54. ;;;
  55. exit
  56.  
  57.